//
//  CJYButtonView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/6/13.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "CJYButtonView.h"

@implementation CJYButtonView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        NSArray *nibView =  [[NSBundle mainBundle] loadNibNamed:@"CJYButtonView"owner:self options:nil];
        self = [nibView objectAtIndex:0];
        self.backgroundColor = [UIColor clearColor];
        [_mingXiButton setBackgroundColor:[UIColor clearColor]];
        [_jiaZhangButton setBackgroundColor:[UIColor clearColor]];
    }
    return self;
}
- (IBAction)lianXiJiaZhangClick:(id)sender {
    //
    if (self.callBlock) {
        self.callBlock(self.index);
    }
    
}
- (IBAction)mingXiClick:(id)sender {
    if (self.block) {
        self.block(self.index);
    }
    
}

@end
